﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Xml.Linq;
using WebComponents.Data;
using WebComponents;

public partial class MasterPage : System.Web.UI.MasterPage {
  public string topContent = "top_content_page";
  protected void Page_Load(object sender, EventArgs e) {
    PageDescriptionInfo p = PageDescriptionController.GetByPageName("Quickcontact", WebComponents.Global.CurrentCultureCode);
    if (p != null) {
      lblTitle.Text = p.PageTitle;
      lblContent.Text = p.FullDescription;
    }
    string url = this.Page.ToString().Replace("_", "-").ToLower();
    url = url.Substring(0, url.LastIndexOf("-")) + ".aspx";
    if (url.Contains("default.aspx")) {
      topContent = "top";
    }
    var list = ArticleController.GetByCateID(75, Global.CurrentCultureCode).Where(a => a.IsApproved == true && a.OnlyForMembers == true).ToList();
    rptServices.DataSource = list;
    rptServices.DataBind();
    var list2 = ArticleController.GetByCateID(76, Global.CurrentCultureCode).Where(a => a.IsApproved == true && a.OnlyForMembers == true).ToList();
    rptDanhMucDauTu.DataSource = list2;
    rptDanhMucDauTu.DataBind();
  }
}
